A relational operator tests or defines the relation between two operands. These relations include numerical equality (e.g., 5=5) and inequalities (e.g., 4≧3), for example. An expression created using a relational operator forms what is known as a relational expression. Generally, in computing systems that include a type system, in a given relational expression, care must be taken that the types of the operands and the type-suitability of the relational operator are matched. If such care is not taken, overt or hidden errors can occur during program execution. In programming languages that include a boolean type in their type system, the evaluation of a relational expression returns true or false, depending on whether or not the conditional relationship between the two operands holds.
A type system associates a type with a value stored in a memory of a computing system, to give a categorical meaning to a sequence, or set, of bits defining the value. In many circumstances the hardware of a computing system is unable to discriminate between the set of bits for a memory address and the set of bits for an instruction code, character, integer, or floating-point number, because the hardware cannot make any intrinsic distinction between any of the possible values of the sets of bits. By associating types with values, and by examining the flow or status of these values before or during program execution, a type system attempts to prove or ensure that certain kinds of errors do not occur. The particular type system in question determines exactly what constitutes a type error, but in general the aim is to prevent a certain kind of value from being used with an operation for which that kind of value does not make sense. Type systems are often specified as parts of programming languages, including query languages for databases, and built into the interpreters and compilers for them.
An interpreter or compiler may use the type of a value to optimize the storage it needs and the choice of operators or algorithms for operations on the value. For example, in many C compilers the float type is represented in 32 bits formatted to include an exponent portion and a mantissa portion, in accord with the IEEE specification for single-precision floating point numbers. These compilers will thus use floating-point-specific microprocessor operations on those values (floating-point addition, multiplication, etc.). For another example, in many database query language interpreters, several integer types are represented with corresponding different bit lengths. These interpreters will thus use particular appropriate optimizations regarding database storage of the several integer type representations.